<h1>Adverts List</h1>

<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>Advert header</th>
      <th>Advert text</th>
      <th>Author</th>
      <th>Start at</th>
      <th>Expires at</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($adverts as $advert): ?>
    <tr>
      <td><a href="<?php echo url_for('advert/show?id='.$advert->getId()) ?>"><?php echo $advert->getId() ?></a></td>
      <td><?php echo $advert->getAdvertHeader() ?></td>
      <td><?php echo $advert->getAdvertText() ?></td>
      <td><?php echo $advert->getAuthorId() ?></td>
      <td><?php echo $advert->getStartAt() ?></td>
      <td><?php echo $advert->getExpiresAt() ?></td>
      <td><?php echo $advert->getCreatedAt() ?></td>
      <td><?php echo $advert->getUpdatedAt() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('advert/new') ?>">New</a>
